#include <stdio.h>

/**
 * 员工
 */
struct Employee {
	/**
	 * 姓名
	 */
	char name[30];

	/**
	 * 性别
	 */
	char sex[10];

	/**
	 * 年龄
	 */
	int age;

	/**
	 * 工资
	 */
	double salary;
};

int main() {
	int array_length = 3;
	struct Employee employees[array_length];

	for (int i = 0; i < array_length; i++) {
		printf("Format (name sex age salary)\n");
		printf("Please enter employee info:\n");
		scanf("%s %s %d %lf",
			  employees[i].name,
			  employees[i].sex,
			  &employees[i].age,
			  &employees[i].salary);
	}

	printf("\n\nName\t Sex\t Age\t Salary\n");
	for (int i = 0; i < array_length; i++) {
		struct Employee employee = employees[i];
		printf("%s\t %s\t %d\t %.2lf\n",
			   employee.name,
			   employee.sex,
			   employee.age,
			   employee.salary);
	}

}

